﻿<%@ Page Title="Monitoring Contact Person" Language="C#" MasterPageFile="~/NPS/app/Monitoring/monitoring.master" AutoEventWireup="true" CodeFile="ContactPerson.aspx.cs" Inherits="NPS_app_Monitoring_ContactPerson" %>

<asp:Content ContentPlaceHolderID="Back" runat="server">
    <a class="backbutton" href="../../Default.aspx" data-bind="click: closeApp">
        <img src="../../img/Left.png" />
    </a>
</asp:Content>
<asp:Content ContentPlaceHolderID="Header" runat="server">
    Monitoring: Contact Person
</asp:Content>
<asp:Content ContentPlaceHolderID="body" runat="server">
    <div id="body">
        <!-- Jquery Core-->
        <script type="text/javascript" src="../../js/jquery182.js"></script>
        <script type="text/javascript" src="../../js/jquery-ui.js"></script>
        <link rel="stylesheet" href="../../css/jquery-ui.css">
        <div class="container metro">            
            <form class="metro-form" runat="server" id="Monitoring">
            <style>
                .alpha60
                {
                    /* Fallback for web browsers that doesn't support RGBa */
                    background: rgb(0, 0, 0) transparent; /* RGBa with 0.6 opacity */
                    background: rgba(0, 0, 0, 0.6); /* For IE 5.5 - 7*/
                    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000); /* For IE 8*/
                    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";
                }
            </style>
            <script>


                function CloseDialog() {
                    $("#divEdit").slideToggle();
                    $("#divEditOverlay").slideToggle();
                    $("#divPopup").slideToggle();
                    $("#divPopupOverlay").slideToggle();
                }
                $(document).ready(function () {
                    $("#divPopup").hide();
                    $("#divPopupOverlay").hide();
                    $('#btnCariNama').live('click', function () {
                        $("#divPopup").slideToggle();
                        $("#divPopupOverlay").slideToggle();
                    });
                    $('#closePopup').live('click', function () {
                        $("#divPopup").slideToggle();
                        $("#divPopupOverlay").slideToggle();
                    });
                    $('#divPopupOverlay').live('click', function () {
                        $("#divPopup").slideToggle();
                        $("#divPopupOverlay").slideToggle();
                    });

                    $("#divEdit").hide();
                    $("#divEditOverlay").hide();
                    $('#ctl00_body_btnEdit').live('click', function () {
                        $("#divEdit").slideToggle();
                        $("#divEditOverlay").slideToggle();
                    });
                    $('#ctl00_body_btnSave').live('click', function () {
                        $("#divEdit").slideToggle();
                        $("#divEditOverlay").slideToggle();
                    });
                    $('#closeEdit').live('click', function () {
                        $("#divEdit").slideToggle();
                        $("#divEditOverlay").slideToggle();
                    });

                    $('#divEditOverlay').live('click', function () {
                        $("#divEdit").slideToggle();
                        $("#divEditOverlay").slideToggle();
                    });
                });
            </script>
                <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"
                    AsyncPostBackTimeout="7200" ScriptMode="Auto">
                </asp:ScriptManager>    
                <asp:UpdatePanel ID="upHeader" runat="server" UpdateMode="Conditional">
                     <Triggers>
                        <asp:PostBackTrigger  ControlID="gvSearch" />
                        <asp:PostBackTrigger  ControlID="ddlBatch" />
                        <asp:PostBackTrigger  ControlID="btnSave" />
                    </Triggers>
                    <ContentTemplate>                                           
                        <asp:HiddenField ID="hfID" runat="server"/>                                
                        <asp:HiddenField ID="hfNPSID" runat="server"/> 
                        <div class="metro-form-control" style="width: 500px">
                            <div class="metro-text-box" align="right">
                                Batch:  <asp:DropDownList ID="ddlBatch" Width="100px" OnSelectedIndexChanged="ddlBatch_SelectedIndexChanged" runat="server" AutoPostBack="true"></asp:DropDownList>
                            </div>
                        </div>
                        <div class="metro-form-control" style="width: 325px">
                            <label>Nama</label>
                            <div class="metro-text-box">
                                <asp:TextBox ID="txtNama" runat="server"  Width="225px" Enabled="false"></asp:TextBox>
                                <Button ID="btnCariNama"  Class="metro-button-srch">Cari</Button>
                            </div>
                        </div>
                        <asp:Panel ID="pnlView" runat="server">
                        <div class="metro-form-control" style="width: 300px">
                            <label>NPS Score</label>
                            <div class="metro-text-box">
                                <asp:TextBox ID="txtNPSScore" runat="server" Enabled="false"></asp:TextBox>
                            </div>
                        </div>
                        <div class="metro-form-control" style="width: 300px">
                            <label>Status NPS</label>
                            <div class="metro-text-box">
                                <asp:TextBox ID="txtStatusNPS" runat="server" Enabled="false"></asp:TextBox>
                            </div>
                        </div>
                        <div class="metro-form-control" style="width: 300px">
                            <label>Position</label>
                            <div class="metro-text-box">
                                <asp:TextBox ID="txtPotition" runat="server" Enabled="false"></asp:TextBox>
                            </div>
                        </div>
                        <div class="metro-form-control" style="width: 325px">
                            <label>Kategori</label>
                            <div class="metro-text-box">
                                <asp:TextBox ID="txtKategori" runat="server" Enabled="false" Width="225px"></asp:TextBox>
                                <asp:Button ID="btnEdit" runat="server" CssClass="metro-button-srch" Text="Edit"></asp:Button>
                            </div>
                        </div>
                        <div class="metro-form-control" style="width: 300px">
                            <label>Perusahaan</label>
                            <div class="metro-text-box">
                                <asp:TextBox ID="txtPerusahaan" runat="server" Enabled="false"></asp:TextBox>
                            </div>
                        </div>
                        <div class="metro-form-control" style="width: 300px">
                            <label>Kelas</label>
                            <div class="metro-text-box">
                                <asp:TextBox ID="txtKelas" runat="server" Enabled="false"></asp:TextBox>
                            </div>
                        </div>
                        <div class="metro-form-control" style="width: 300px">
                            <label>Segment</label>
                            <div class="metro-text-box">
                                <asp:TextBox ID="txtSegment" runat="server" Enabled="false"></asp:TextBox>
                            </div>
                        </div>
                         <asp:GridView ID="gvSA" runat="server" AutoGenerateColumns="false" Font-Names="Arial"
                            Font-Size="11pt" AlternatingRowStyle-BackColor="#C2D69B" HeaderStyle-BackColor="green" >
                            
                        </asp:GridView>
                         <asp:GridView ID="gvMA" runat="server" AutoGenerateColumns="false" Font-Names="Arial"
                            Font-Size="11pt" AlternatingRowStyle-BackColor="#C2D69B" HeaderStyle-BackColor="green" >
                            
                        </asp:GridView>

                        
                         <asp:GridView ID="gvSurvey" runat="server" AutoGenerateColumns="false" Font-Names="Arial"
                            Font-Size="11pt" AlternatingRowStyle-BackColor="#C2D69B" HeaderStyle-BackColor="green" >
                            
                        </asp:GridView>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <div id="divEditOverlay" class="alpha60" style="width: 3000px; height: auto; position: fixed;
                top: 0; bottom: 0; right: 0;">
            </div>
            
            <div id="divEdit" style="position: absolute; z-index: 99; top: 200px; left: 400px;
                background-color: #2597CB; padding: 20px;">
                <table>
                    <tr>
                        <td valign="middle" width="100px" height="50px">Nama</td>
                        <td>                            
                            <div class="metro-form-control" style="width: 300px; height:22px;">
                                <div class="metro-text-box">
                                    <asp:TextBox ID="txtEditNama" runat="server"  Width="225px" Enabled="false"></asp:TextBox>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td valign="middle" height="50px">Kategori</td>
                        <td>                            
                            <div class="metro-form-control" style="width: 300px; height:22px;">
                                <div class="metro-text-box">
                                    <asp:DropDownList ID="ddlKategori" Width="245px" runat="server"  DataValueField="iID" DataTextField="sxTitle"></asp:DropDownList>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td valign="middle" height="50px">Batch</td>
                        <td>                            
                            <div class="metro-form-control" style="width: 300px; height:22px;">
                                <div class="metro-text-box">
                                    <asp:DropDownList ID="ddlEditBatch" Width="100px" runat="server" Enabled="false"></asp:DropDownList>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Button ID="btnSave" OnClick="btnSave_Click" runat="server" CssClass="metro-button"
                                Text="Simpan" />
                            &nbsp;
                            <button ID="closeEdit" Class="metro-button">Batal</button>
                        </td>
                    </tr>
                </table>
            </div>

            <div id="divPopupOverlay" class="alpha60" style="width: 3000px; height: auto; position: fixed;
                top: 0; bottom: 0; right: 0;">
            </div>
            <div id="divPopup" style="position: absolute; z-index: 99; top: 100px; left: 200px;
                background-color: #2597CB; padding: 20px;">
                <asp:UpdatePanel runat="server" ID="up1">
                    <ContentTemplate>

                         <div>
                            <table>
                                <tr>
                                    <td style="width: 90px;">
                                        <label>
                                            Nama</label>
                                    </td>
                                    <td>
                                        <div class="metro-text-box">
                                            <asp:TextBox ID="txtSearchName" runat="server"></asp:TextBox>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label>
                                            Perusahaan</label>
                                    </td>
                                    <td>
                                        <div style="height: 38px;">
                                            <div class="metro-text-box">
                                                <asp:TextBox ID="txtSearchCompany" runat="server"></asp:TextBox>
                                            </div>
                                            <div style="position: relative; top: -52px; right: -239px;">
                                                <asp:LinkButton runat="server" CssClass="metro-button" ID="btnSearch" Text="Cari"
                                                    OnClick="btnSearch_Click" /></div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <div class="metro-form" style="width: 800px; font-size: 14px;">
                                            <asp:GridView ID="gvSearch" runat="server" Width="100%" Height="1px" AllowPaging="True"
                                                HeaderStyle-BackColor="#626270" Font-Names="Arial" Font-Size="11pt" RowStyle-VerticalAlign="Top"
                                                AutoGenerateColumns="False" PageSize="10" BorderColor="white" BorderStyle="Solid"
                                                RowStyle-BackColor="#6291B1" AlternatingRowStyle-BackColor="#4FA1DA" BorderWidth="4px"
                                                CellPadding="3" ForeColor="Black" GridLines="Both" Style="margin-top: 0em;" ShowFooter="false"
                                                OnRowCommand="gvSearch_RowCommand">
                                                <Columns>
                                                    <asp:BoundField HeaderText="Nama" DataField="sxpicname" ItemStyle-Font-Size="11px" />
                                                    <asp:BoundField HeaderText="Perusahaan" DataField="sxcompanyname" ItemStyle-Font-Size="11px" />
                                                    <asp:BoundField HeaderText="Jabatan" DataField="sxposition" ItemStyle-Font-Size="11px" />
                                                    <asp:TemplateField ItemStyle-VerticalAlign="Top" ItemStyle-HorizontalAlign="Center"
                                                        ItemStyle-Width="100px">
                                                        <ItemTemplate>
                                                            <asp:LinkButton Text="Pilih" runat="server" ID="btnChoose" CssClass="metro-button"
                                                                Style="font-size: 11px; margin: 0; padding: 0 10px 0 10px;" CommandName="choose"
                                                                CommandArgument='<%# Eval("iID") %>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <EmptyDataTemplate>
                                                    No Records Found</EmptyDataTemplate>
                                                <PagerSettings PageButtonCount="5" NextPageText="Next" PreviousPageText="Previous"
                                                    FirstPageText="First" LastPageText="last" Mode="NumericFirstLast" />
                                            </asp:GridView>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                            <div style="position: absolute; top: 9px; right: 11px;">
                                <button class="metro-button" id="closePopup">
                                    Close</button>
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
            <asp:UpdateProgress ID="updateProgress" runat="server" >
                    <ProgressTemplate>
                     <%--   <div style="position: fixed; text-align: center; height: 100%; width: 100%; top: 0;
                            right: 0; left: 0; z-index: 9999999; background-color: #000000; opacity: 0.7;">
                            <span style="border-width: 0px; position: fixed; padding: 50px; background-color: #FFFFFF;
                                font-size: 36px; left: 40%; top: 40%;color:Black;">Please Wait...</span>
                        </div>--%>
                    </ProgressTemplate>
                </asp:UpdateProgress>
            </form>
        </div>
    </div>
</asp:Content>

